const _ = require("lodash")
const koa = require("koa");
const Router = require("@koa/router")
const error = require('koa-json-error')
const app = new koa();
const router = new Router({
    prefix:"/hello"
});

router.get('/', (ctx,next) => {
    console.log(xxx)
});

let options = {
    postFormat: (e, obj) => {
        return  process.env.NODE_ENV === 'pro' ? _.omit(obj, 'stack') : obj
    }
}
app.use(error(options))
app.use(router.routes());
app.listen(8888,"127.0.0.1",()=>{
    console.log("server is running on http://127.0.0.1:8888")
})